<h1>评论管理</h1>

<table>
  <tr>
    <th width="12%">用户名</th>
    <th>内容</th>
    <th width="12%">管理</th>
  </tr>
<% @comments.each do |comment| %>
  <tr>
    <td><%=h comment.username %></td>
    <td><%=h comment.content %></td>
    <td><%= link_to_remote image_tag('edit.png',:alt => '编辑'), :update => 'content', :method => :get, :url => edit_comment_path(comment) %>
        <%= link_to_remote image_tag('delete.png',:alt => '删除'), :update => "content", :url => comment_url(comment),:method => :delete, :confirm => "你确定删除吗?" %></td>
  </tr>
<% end %>
</table>